package com.matrix.java.chap_05;
/*
    示例抵消错误
 */
public class Ex5_23 {
    public static void main(String[] args) {
        double sumLeft = 0;
        double sumRight = 0;
        for (int i = 1; i <= 50000; i++) {
            sumLeft += 1.0/i;
        }
        for (int i = 50000; i >= 1; i--) {
            sumRight += 1.0/i;
        }
        System.out.println(sumLeft);
        System.out.println(sumRight);
    }
}
